package com.ruoyi.inventory.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

import java.util.Date;

/**
 * 商品对象 t_product
 *
 * @author xwj
 * @date 2024-06-11
 */
@TableName("t_product")
@Data
public class Product extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 编号 */
    @Excel(name = "编号")
    @ApiModelProperty("编号")
    private String no;

    /** 名称 */
    @Excel(name = "名称")
    @ApiModelProperty("名称")
    private String name;

    /** 规格 */
    @Excel(name = "规格")
    @ApiModelProperty("规格")
    private String specs;

    /** 类别id */
    @Excel(name = "类别id")
    @ApiModelProperty("类别id")
    private Long categoryId;

    @ApiModelProperty("类别名称")
    @TableField(exist = false)
    private String categoryName;

    /** 单位id */
    @Excel(name = "单位id")
    @ApiModelProperty("单位id")
    private Long unitId;

    @ApiModelProperty("单位")
    @TableField(exist = false)
    private String unitName;

    /** 采购单价 */
    @Excel(name = "采购单价")
    @ApiModelProperty("采购单价")
    private Double buyPrice;

    /** 销售单价 */
    @Excel(name = "销售单价")
    @ApiModelProperty("销售单价")
    private Double sellPrice;

    /** 附件名称 */
    @Excel(name = "附件名称")
    @ApiModelProperty("附件名称")
    private String attachName;

    /** 附件路径 */
    @Excel(name = "附件路径")
    @ApiModelProperty("附件路径")
    private String attachPath;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("删除标志")
    private Integer deleteFlag;

    /** 创建人id */
    @Excel(name = "创建人id")
    @ApiModelProperty("创建人id")
    private Long createId;
    private Date createTime;
    private String createBy;

    /** 更新人id */
    @Excel(name = "更新人id")
    @ApiModelProperty("更新人id")
    private Long updateId;
    private Date updateTime;
    private String updateBy;

    private Double weight;
    private Double length;
    private Double width;
    private Double height;
    private Double mouth1;
    private Double mouth2;

    private Integer type; // 1原材料；2商品
    private String source; // 来源:1、自产/2、外购/3、其他(不参与MRP运算)



    private Long customerId; // 供应商id
    @TableField(exist = false)
    private String customerName; // 供应商姓名

    @TableField(exist = false)
    private String sourceUnitName; // 元单位


    @TableField(exist = false)
    private Double standardWeight; // 元单位
}
